﻿@using Microsoft.AspNet.Identity
<style>
    .loginName_top {
    }

        .loginName_top ul {
            list-style: none;
            padding: 37px;
        }

            .loginName_top ul li {
                float: left;
                padding: 10px;
            }

                .loginName_top ul li a {
                    font-weight: bold;
                    color: #F80506;
                }
</style>

@if (Request.IsAuthenticated)
{
    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
    {
        @Html.AntiForgeryToken()
        <div class="loginName_top">
            <ul>
                <li>
                    @Html.ActionLink("Xin chào " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" })
                </li>
                <li>
                    <a style="font-weight:bold;" href="javascript:document.getElementById('logoutForm').submit()">
                        Đăng xuất
                    </a>
                </li>
            </ul>
        </div>
    }
}
else
{
    <ul class="nav navbar-nav navbar-right">
        @*<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>*@
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
